
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpAclsUser.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpAclsUserForm"
 */
public class CcpAclsUserForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cauGuid = null;
   private java.lang.String _unitCode = null;
   private java.lang.String _name = null;
   private java.lang.String _sex = null;
   private java.lang.String _birth = null;
   private java.lang.String _nation = null;
   private java.lang.String _address = null;
   private java.lang.String _political = null;
   private java.lang.String _workDate = null;
   private java.lang.String _mobile = null;
   private java.lang.String _workUnit = null;
   private java.lang.String _education = null;
   private java.lang.String _tecTitle = null;
   private java.lang.String _tel = null;
   private java.lang.String _duty = null;
   private java.lang.String _email = null;
   private java.lang.String _postcode = null;
   private java.lang.String _userGuid = null;
   private java.lang.String _depart = null;

   /**
    * Standard constructor.
    */
   public CcpAclsUserForm() {
   }

   /**
    * Returns the cauGuid
    *
    * @return the cauGuid
    */
   public java.lang.String getCauGuid() {
      return _cauGuid;
   }

   /**
    * Sets the cauGuid
    *
    * @param cauGuid the new cauGuid value
    */
   public void setCauGuid(java.lang.String cauGuid) {
      _cauGuid = cauGuid;
   }
   /**
    * Returns the unitCode
    *
    * @return the unitCode
    */
   public java.lang.String getUnitCode() {
      return _unitCode;
   }

   /**
    * Sets the unitCode
    *
    * @param unitCode the new unitCode value
    */
   public void setUnitCode(java.lang.String unitCode) {
      _unitCode = unitCode;
   }
   /**
    * Returns the name
    *
    * @return the name
    */
   public java.lang.String getName() {
      return _name;
   }

   /**
    * Sets the name
    *
    * @param name the new name value
    */
   public void setName(java.lang.String name) {
      _name = name;
   }
   /**
    * Returns the sex
    *
    * @return the sex
    */
   public java.lang.String getSex() {
      return _sex;
   }

   /**
    * Sets the sex
    *
    * @param sex the new sex value
    */
   public void setSex(java.lang.String sex) {
      _sex = sex;
   }
   /**
    * Returns the birth
    *
    * @return the birth
    */
   public java.lang.String getBirth() {
      return _birth;
   }

   /**
    * Sets the birth
    *
    * @param birth the new birth value
    */
   public void setBirth(java.lang.String birth) {
      _birth = birth;
   }
   /**
    * Returns the nation
    *
    * @return the nation
    */
   public java.lang.String getNation() {
      return _nation;
   }

   /**
    * Sets the nation
    *
    * @param national the new nation value
    */
   public void setNation(java.lang.String nation) {
      _nation = nation;
   }
   /**
    * Returns the address
    *
    * @return the address
    */
   public java.lang.String getAddress() {
      return _address;
   }

   /**
    * Sets the address
    *
    * @param address the new address value
    */
   public void setAddress(java.lang.String address) {
      _address = address;
   }
   /**
    * Returns the political
    *
    * @return the political
    */
   public java.lang.String getPolitical() {
      return _political;
   }

   /**
    * Sets the political
    *
    * @param political the new political value
    */
   public void setPolitical(java.lang.String political) {
      _political = political;
   }
   /**
    * Returns the workDate
    *
    * @return the workDate
    */
   public java.lang.String getWorkDate() {
      return _workDate;
   }

   /**
    * Sets the workDate
    *
    * @param workDate the new workDate value
    */
   public void setWorkDate(java.lang.String workDate) {
      _workDate = workDate;
   }
   /**
    * Returns the mobile
    *
    * @return the mobile
    */
   public java.lang.String getMobile() {
      return _mobile;
   }

   /**
    * Sets the mobile
    *
    * @param mobile the new mobile value
    */
   public void setMobile(java.lang.String mobile) {
      _mobile = mobile;
   }
   /**
    * Returns the workUnit
    *
    * @return the workUnit
    */
   public java.lang.String getWorkUnit() {
      return _workUnit;
   }

   /**
    * Sets the workUnit
    *
    * @param workUnit the new workUnit value
    */
   public void setWorkUnit(java.lang.String workUnit) {
      _workUnit = workUnit;
   }
   /**
    * Returns the education
    *
    * @return the education
    */
   public java.lang.String getEducation() {
      return _education;
   }

   /**
    * Sets the education
    *
    * @param education the new education value
    */
   public void setEducation(java.lang.String education) {
      _education = education;
   }
   /**
    * Returns the tecTitle
    *
    * @return the tecTitle
    */
   public java.lang.String getTecTitle() {
      return _tecTitle;
   }

   /**
    * Sets the tecTitle
    *
    * @param tecTitle the new tecTitle value
    */
   public void setTecTitle(java.lang.String tecTitle) {
      _tecTitle = tecTitle;
   }
   /**
    * Returns the tel
    *
    * @return the tel
    */
   public java.lang.String getTel() {
      return _tel;
   }

   /**
    * Sets the tel
    *
    * @param tel the new tel value
    */
   public void setTel(java.lang.String tel) {
      _tel = tel;
   }
   /**
    * Returns the duty
    *
    * @return the duty
    */
   public java.lang.String getDuty() {
      return _duty;
   }

   /**
    * Sets the duty
    *
    * @param duty the new duty value
    */
   public void setDuty(java.lang.String duty) {
      _duty = duty;
   }
   /**
    * Returns the email
    *
    * @return the email
    */
   public java.lang.String getEmail() {
      return _email;
   }

   /**
    * Sets the email
    *
    * @param email the new email value
    */
   public void setEmail(java.lang.String email) {
      _email = email;
   }
   /**
    * Returns the postcode
    *
    * @return the postcode
    */
   public java.lang.String getPostcode() {
      return _postcode;
   }

   /**
    * Sets the postcode
    *
    * @param postcode the new postcode value
    */
   public void setPostcode(java.lang.String postcode) {
      _postcode = postcode;
   }
   /**
    * Returns the userGuid
    *
    * @return the userGuid
    */
   public java.lang.String getUserGuid() {
      return _userGuid;
   }

   /**
    * Sets the userGuid
    *
    * @param userGuid the new userGuid value
    */
   public void setUserGuid(java.lang.String userGuid) {
      _userGuid = userGuid;
   }
   /**
    * Returns the depart
    *
    * @return the depart
    */
   public java.lang.String getDepart() {
      return _depart;
   }

   /**
    * Sets the depart
    *
    * @param depart the new depart value
    */
   public void setDepart(java.lang.String depart) {
      _depart = depart;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCauGuid() == null) {
         errors.add("cauGuid", new ActionError("error.cauGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
